package com.atguigu07.encapsulation.ex2;

public class book {
   private String name;
    private  String author;
    private double price;

    public void setAuthor(String author) {
        this.author = author;
    }

    public String getAuthor() {
        return author;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getName() {
        return name;
    }

    public double getPrice() {
        return price;
    }

    public void setPrice(double price) {
        this.price = price;
    }

    public void showmessage(){
        System.out.println("作者是："+author+"书名为："+name+"价格为："+price);
    }
}
